package com.wsoft.hr.pm.manager;

import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wsoft.hr.pm.entity.HrPmCycleEntity;
import com.wsoft.hr.pm.mapper.HrPmCycleMapper;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author z001
 * @Date 2025/3/8 08:27
 */
@Service
public class HrPmCycleManager extends ServiceImpl<HrPmCycleMapper, HrPmCycleEntity> {


    /**
     * 按照截止时间 模糊搜索
     * @param expireDate
     * @return
     */
    public List<HrPmCycleEntity> likeExpireDate(String expireDate){
        if(StrUtil.isBlank(expireDate)){
            return new ArrayList<>();
        }
        QueryWrapper<HrPmCycleEntity> query = new QueryWrapper<>();
        query.lambda().like(HrPmCycleEntity::getExpireDate,expireDate);
        return super.list(query);
    }







}
